<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>发布公告</title>
    <meta name="renderer" content="webkit">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="{$Think.const.RESOURCE}css/font.css">
    <link rel="stylesheet" href="{$Think.const.RESOURCE}css/xadmin.css">
    <script type="text/javascript" src="{$Think.const.RESOURCE}js/jquery.min.js"></script>
    <script type="text/javascript" src="{$Think.const.RESOURCE}lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="{$Think.const.RESOURCE}js/xadmin.js"></script>
  </head>
  
  <body class="layui-anim layui-anim-up">
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页/发布公告</a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:39px">ဂ</i></a>
    </div>
    <div class="x-body">
      <xblock>
        <span><input style="width:300px;display:inline" value="<color=#FF0000>红色</color>"  class="layui-input"></span>
        <span><input style="width:300px;display:inline" value="<color=#F9F900>橙色</color>"  class="layui-input"></span>
      </xblock>
      <label>公告内容</label>
      <table class="layui-table">
         <textarea name="content" rows="10" cols="40" class="layui-textarea"></textarea>
         <tr>
            <th>
                <sapn><input style="width:100px;display:inline" type="number"   id="count"  value="" class="layui-input">次</sapn>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button onclick="StartSends();"  class="layui-btn layui-btn-danger">发送</button>
            </th>
         </tr>
      </table>
    </div>
  </body>
</html>
 <script>
        var content="";
        var count=0;
        function StartSends(){
            content=$('textarea[name="content"]').val();
            count = $("#count").val();
            $.ajax({
                    url:'/broadcast/send',
                    type:"POST",
                    data:'content='+content+'&count='+count,success: function(data){
                        alert(data);
                    }
            });
        }   
 </script>